import 'package:flutter/material.dart';
import 'package:we_chat/pages/discover/discover_cell.dart';
import '../const.dart';

class DiscoverPage extends StatefulWidget {
  Color _themeColor = WeChatThemeColor;

  @override
  State<DiscoverPage> createState() => _DiscoverPageState();
}

class _DiscoverPageState extends State<DiscoverPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('发现'),
        //以下三个为了安卓而使用的
        elevation: 0,//底部边栏
        centerTitle: true,//为了安卓设置的，切换app的时候，显示的文字
        backgroundColor: widget._themeColor,//widget能间接拿到上面的_themeColor
      ),
      body: Center(
        child: Container(
          color: widget._themeColor,
          height: 800,
          child: ListView(
            children: [
              DiscoverCell(imageName: 'images/朋友圈.png',title: '朋友圈',),
              SizedBox(height: 10,),

              DiscoverCell(imageName: 'images/扫一扫2.png',title: '扫一扫',),
              Row(children: [
                Container(width: 50,height: 0.5,color: Colors.white,),//左边的空隙
                Container(height: 0.5,color: Colors.grey,),//右边的线
              ],),
              DiscoverCell(imageName: 'images/摇一摇.png',title: '摇一摇',),
              SizedBox(height: 10,),

              DiscoverCell(imageName: 'images/看一看icon.png',title: '看一看',),
              Row(children: [
                Container(width: 50,height: 0.5,color: Colors.white,),//左边的空隙
                Container(height: 0.5,color: Colors.grey,),//右边的线
              ],),
              DiscoverCell(imageName: 'images/搜一搜.png',title: '搜一搜',),
              SizedBox(height: 10,),

              DiscoverCell(imageName: 'images/附近的人icon.png',title: '附近的人',),
              SizedBox(height: 10,),

              DiscoverCell(imageName: 'images/购物.png',title: '购物',),
              Row(children: [
                Container(width: 50,height: 0.5,color: Colors.white,),//左边的空隙
                Container(height: 0.5,color: Colors.grey,),//右边的线
              ],),
              DiscoverCell(imageName: 'images/游戏.png',title: '游戏',),
              SizedBox(height: 10,),

              DiscoverCell(imageName: 'images/小程序.png',title: '小程序',),
            ],
          ),
        ),
      ),
    );
  }
}
